/**  
* @project_name yjd_comm
* @Title: OrderStatus.java
* @Package com.yjd.comm.enums
* @Description: TODO
* @author renbangjie renbangjie@126.com  
* @date 2014-9-9 上午10:20:16
* @version V1.0  
* <b>Copyright (c)</b> 2014医信金融信息服务（上海）有限公司-版权所有<br/>
*/
package com.yjd.comm.enums;

/**
 * @ClassName: OrderStatus
 * @Description: TODO
 * @author renbangjie renbangjie@126.com
 * @date 2014-9-9 上午10:20:16
 */
public enum OrderStatus {

	success(1, "充值成功"),
	failed(2, "充值失败"),
	ready(0, "待充值");
	
	
	private int code;
	
	private String label;

	private OrderStatus(int code, String label) {
		this.code = code;
		this.label = label;
	}
	
	
	public static OrderStatus parse(int code){
		for (OrderStatus status : OrderStatus.values()) {
			if(status.getCode() == code){
				return status;
			}
		}
		return null;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}
	
}
